/**
 * 
 */
package de.htwg.ppt2html5.extraction;


import java.util.HashMap;
import java.util.Map;

import org.docx4j.openpackaging.parts.PresentationML.NotesSlidePart;
import org.docx4j.openpackaging.parts.PresentationML.SlideLayoutPart;
import org.docx4j.openpackaging.parts.PresentationML.SlideMasterPart;
import org.docx4j.openpackaging.parts.PresentationML.SlidePart;
import org.pptx4j.pml.CTGraphicalObjectFrame;
import org.pptx4j.pml.CTRel;
import org.pptx4j.pml.CxnSp;
import org.pptx4j.pml.Pic;
import org.pptx4j.pml.Shape;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * this class represents a slide from the PPT as an internal object.
 * 
 * @author Roman Allenov
 */
public class Slide {

   private static Logger                       log        = LoggerFactory.getLogger(Slide.class);

   private SlidePart                           slide;
   private SlideLayoutPart                     slideLayout;
   private SlideMasterPart                     slideMaster;
   private NotesSlidePart                      slideNotes;
   // occur once
   private String                              ctrTitle   = "";
   private String                              subTitle   = "";

   private String                              slideTitle = "";
   private String                              body       = "";

   private Map<String, CTGraphicalObjectFrame> graphFrames;
   private Map<String, Shape>                  shapes;
   private Map<String, Shape>                  phShapes;
   private Map<String, CxnSp>                  connectors;
   private Map<String, Pic>                    pics;
   private Map<String, CTRel>                  relations;


   public Slide() {
      setGraphFrames(new HashMap<String, CTGraphicalObjectFrame>());
      setShapes(new HashMap<String, Shape>());
      setphShapes(new HashMap<String, Shape>());
      setConnectors(new HashMap<String, CxnSp>());
      setPics(new HashMap<String, Pic>());
      setRelations(new HashMap<String, CTRel>());

   }


   public SlidePart getSlide()
   {
      return slide;
   }


   public void setSlide(SlidePart slide)
   {
      this.slide = slide;
   }


   public SlideLayoutPart getSlideLayout()
   {
      return slideLayout;
   }


   public void setSlideLayout(SlideLayoutPart slideLayout)
   {
      this.slideLayout = slideLayout;
   }


   public SlideMasterPart getSlideMaster()
   {
      return slideMaster;
   }


   public void setSlideMaster(SlideMasterPart slideMaster)
   {
      this.slideMaster = slideMaster;
   }


   public NotesSlidePart getSlideNotes()
   {
      return slideNotes;
   }


   public void setSlideNotes(NotesSlidePart slideNotes)
   {
      this.slideNotes = slideNotes;
   }


   public String getCtrTitle()
   {
      return ctrTitle;
   }


   public void setCtrTitle(String title)
   {
      this.ctrTitle = title;
   }


   public String getSubTitle()
   {
      return subTitle;
   }


   public void setSubTitle(String subTitle)
   {
      this.subTitle = subTitle;
   }


   public String getBody()
   {
      return body;
   }


   public void setBody(String body)
   {
      this.body = body;
   }


   public String getSlideTitle()
   {
      return slideTitle;
   }


   public void setSlideTitle(String slideTitle)
   {
      this.slideTitle = slideTitle;
   }


   /**
    * @return the graphFrames
    */
   public Map<String, CTGraphicalObjectFrame> getGraphFrames()
   {
      return graphFrames;
   }


   /**
    * @param graphFrames
    *        the graphFrames to set
    */
   public void setGraphFrames(Map<String, CTGraphicalObjectFrame> graphFrames)
   {
      this.graphFrames = graphFrames;
   }


   /**
    * @return the shapesList
    */
   public Map<String, Shape> getShapes()
   {
      return shapes;
   }


   /**
    * @param shapesList
    *        the shapesList to set
    */
   public void setShapes(Map<String, Shape> shapesList)
   {
      this.shapes = shapesList;
   }


   public Map<String, Shape> getphShapes()
   {
      return phShapes;
   }


   public void setphShapes(Map<String, Shape> pHShapes)
   {
      this.phShapes = pHShapes;
   }


   /**
    * @return the connectors
    */
   public Map<String, CxnSp> getConnectors()
   {
      return connectors;
   }


   /**
    * @param connectors
    *        the connectors to set
    */
   public void setConnectors(Map<String, CxnSp> connectors)
   {
      this.connectors = connectors;
   }


   /**
    * @return the pics
    */
   public Map<String, Pic> getPics()
   {
      return pics;
   }


   /**
    * @param pics
    *        the pics to set
    */
   public void setPics(Map<String, Pic> pics)
   {
      this.pics = pics;
   }


   /**
    * @return the relations
    */
   public Map<String, CTRel> getRelations()
   {
      return relations;
   }


   /**
    * @param relations
    *        the relations to set
    */
   public void setRelations(Map<String, CTRel> relations)
   {
      this.relations = relations;
   }

}
